'use strict';

const Controller = require('egg').Controller;

class DopageController extends Controller {
    async index() {
        const { ctx } = this;
        var {start,limit} = ctx.query;
        var data = await ctx.service.top250.dopage(start)
        console.log(data.total)
        //计算属性
        // pages:function(){
            // 23
            // [0,5,10,15,20]
            // （item+5)/5
            // [1,2,3,4,5] 
            /* var total = this.total;
            var arr = [];
            for(var i=0;i<total;i+=5){
                arr.push(i);
            }
            // console.log(arr)//start 0,5,10
            // return arr;
            var res = arr.map(item=>{
                return (item+5)/5
            })
            return res; */
        // }
    }
}
module.exports = DopageController;
